/*
 * Copyright (C) 2025 Tsingteng MicroSystem
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @file ce_int.h
 * @brief 定义卡模拟模块内部使用的函数和结构
 */

#ifndef _CE_INT_H_
#define _CE_INT_H_

#include "nci_feature.h"
#if IS_FEATURE_ON(NCI_FEATURE_CE)

#include "ce_utils.h"
#include "ce_techs.h"

/**
 * @brief CE模块管理context
 */
typedef struct {
    bool enabled;
    int technology;
    tMUTEX lock;
#if IS_FEATURE_ON(NCI_FEATURE_CE_DH)
    tCE_T3T_INFO t3t;
    tCE_LIST *listen_list;
#endif // IS_FEATURE_ON(NCI_FEATURE_CE_DH)
    tNCI_CE_CBACK cback;
} tNCI_CE_MANAGER;

/**
 * @brief 获取CE管理模块实例
 *
 * @return 返回CE管理模块实例指针
 */
tNCI_CE_MANAGER *ce_get_instance(void);

#endif // IS_FEATURE_ON(NCI_FEATURE_CE)

#endif /* _CE_INT_H_ */
